import { getPatientByIdAPI } from '@/api/user';
import { patientResponseData, visitorType } from '@/api/user/type';
import { ref } from 'vue';


export function usePatient() {
    let patientData = ref<visitorType>()

    const getPatient = async (id:string) => {
        let res: patientResponseData = await getPatientByIdAPI(id)
        if (res.code == 200) {
            patientData.value = res.data
        }
    }

    return {
        getPatient, patientData
    }
}